Skip to content

Conversation

@copybara-service
Copy link

@copybara-service copybara-service bot commented Oct 29, 2025

pkg/coverage: adopt new coverage interface for kcov

This change updates the kcov implementation to use the new Go coverage
interface provided by the internal/coverage package. The previous
implementation relied on coverdata.Blocks, which is part of the older
coverage tooling.

The new implementation uses runtime/coverage.WriteCounters to get the raw
coverage data and then decodes it using decodecounter.NewDecoder. This
approach is aligned with the modern Go coverage infrastructure.

This change requires a patched Go compiler that allows importing internal
packages. This is a temporary measure until the golang team provides a public
API.

More details can be found here: golang/go#51430

@copybara-service copybara-service bot added the exported Issue was exported automatically label Oct 29, 2025
@copybara-service copybara-service bot force-pushed the test/cl825700145 branch 9 times, most recently from 8f2afed to e7d9093 Compare November 4, 2025 22:27
This change updates the kcov implementation to use the new Go coverage
interface provided by the `internal/coverage` package. The previous
implementation relied on `coverdata.Blocks`, which is part of the older
coverage tooling.

The new implementation uses `runtime/coverage.WriteCounters` to get the raw
coverage data and then decodes it using `decodecounter.NewDecoder`. This
approach is aligned with the modern Go coverage infrastructure.

This change requires a patched Go compiler that allows importing internal
packages. This is a temporary measure until the golang team provides a public
API.

More details can be found here: golang/go#51430

PiperOrigin-RevId: 828145693
@copybara-service copybara-service bot merged commit 9d3d0af into master Nov 4, 2025
@copybara-service copybara-service bot deleted the test/cl825700145 branch November 4, 2025 22:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

exported Issue was exported automatically

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants